package com.iflysse.dao;

import com.iflysse.pojo.po.resp.ClassPoResp;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.List;

@Repository
public interface ClassDao {
    /**
     * 获取所有行政班级
     * @return
     */
    @Select({"select distinct(class_no) from tb_student"})
    @Results({
            @Result(property = "className",column = "class_no"),
    })
    List<ClassPoResp> getAllClass() throws SQLException;
}
